<template>
  <div>
      <Foot/>
      
    
      <div v-show="!bol">
            <div class="w">
                <h3 class="wTop" @click="go()">您的当前位置： 首页  >  专题</h3>
            </div>
            <div class="w wTopm">
                <template v-for="(w1,v1) in warrImg">
                    <div class="wTopmImg" :key="v1" v-if="v1<3">
                        <img :src="w1.imageUrl" alt="图片" />
                    </div>
                </template>

            </div>
      </div>
     
  </div>
</template>

<script>
import axios from 'axios';
import Foot from '../Topsearch';

export default {
    name:'Tong',
    data(){
        return{
            bol:false,
            // warrImg:[false,false,false],
            // warrImg:this.$store.state.wly[0].warrImg,
            warrImg:[],
        }
    },
    beforeMount(){
        // this.getImg();
    },
    mounted(){
        // this.getImg();

    },
    components:{
        Foot,
    },

    methods:{
        getImg(){
           
        },
        go(){
            // console.log(this.warrImg);
        }

    },
   created(){
        axios.get('/api/small/commodity/v1/bannerShow').then(res=>{
                console.log(res.data);
                for(var i=0;i<res.data.result.length;i++){
                    // this.$store.state.wly[0].warrImg[i]=res.data.result[i];
                    // this.warrImg[i]=res.data.result[i];
                    this.$set(this.warrImg,i,res.data.result[i]);

                }
            console.log(this.warrImg);

            })

   }

}
</script>

<style scoped>
.wTop{
    line-height: 54px;
    font-size: 14px;
    color: #666666;
    padding-left: 20px;
    background-color: #f4f4f4;
    text-align: left;
    margin: 20px auto;
}
.wTopm{
    margin-bottom: 20px;
}
.wTopmImg{
    width: 100%;
    height: 500px;
    overflow: hidden;
    background-size: 100%;
    background-color: #f00;
    margin-bottom: 20px;
}
.wTopmImg img{
    width: 100%;
}
.wTopm div:nth-child(1){
    background: url(../../assets/imgs/banner1.png) no-repeat  0 0;
}
.wTopm div:nth-child(2){
    background: url(../../assets/imgs/banner2.png) no-repeat  0 0;
}
.wTopm div:nth-child(3){
    background: url(../../assets/imgs/banner3.png) no-repeat  0 0;
}
.w{
    width: 1280px;
    margin: 0 auto;
}
</style>